example 11
Deep Learning Illustrated: Building Natural Language Processing Models
As shown in Example 11.20, we compile our dense sentiment classifier with a line of code that should already be familiar from recent chapters, except that--because we have a single output neuron within a binary classifier--we use binary_crossentropy cost in place of the categorical_crossentropy cost we used for our multiclass MNIST classifiers.